package cn.sc.summer.constant.token;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

/**
 * 类名：拦截路径配置项
 *
 * @author a-xin
 * @date 2023/12/7 16:22
 */
@Data
@Component
@RefreshScope
@ConfigurationProperties(prefix = "auth.path")
public class AuthProperties {

    /**
     * 是否开启路径权限校验
     */
    private Boolean apiAuthEnable = Boolean.TRUE;

    /**
     * token校验排除api路径
     */
    private String[] authIgnore;

    /**
     * 租户拦截排除api路径
     */
    private String[] tenantIgnore;

    /**
     * 是否开启swagger文档鉴权
     */
    private Boolean swagger = Boolean.FALSE;

    /**
     * swagger鉴权路径
     */
    private String[] swaggerUrl;

    /**
     * 是否开启资源路径鉴权
     */
    private Boolean resource = Boolean.FALSE;

    /**
     * 资源路径鉴权路径
     */
    private String[] resourceUrl;

    /**
     * 短信需要校验路径
     */
    private String[] smsCode;

    /**
     * 图形验证码需要校验路径
     */
    private String[] imageCode;

    /**
     * 网关IP校验黑名单
     */
    private String[] black;

}

